from random import *
a=randint(1,100)
b=randint(1,100)
c=randint(1,100)
i=min(a,b,c)
while 1:
    if (a%i==0 and b%i==0 and c%i==0):
        print("{},{},{}的最大公约数为:{}".format(a,b,c,i))
        break
    i=i-1
i=max(a,b,c)
while 1:
    if (i%a==0 and i%b==0 and i%c==0):
        print("{},{},{}的最小公倍数为:{}".format(a,b,c,i))
        break
    i=i+1
